const mongoose=require('mongoose');
//芒果数据库开启的方法
function dbConnect() {
    mongoose.connect('mongodb://127.0.0.1/Item');
    mongoose.connection.once('open',function (err) {
        if(err){
            console.log('mongodb is not opening');
        }else{
            console.log('mongodb is opening');
        }
    })
}

exports.dbConnect=dbConnect;